home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BMUG PD-ROM BV3
/
BMUG PD-ROM Version BV3 (CDRM1097900).iso
/
QuickTime
/
QuickTime Utilities
/
E D T V
/
remote.c
< prev
Wrap
Text File
|
1991-12-05
|
22KB
|
1,033 lines
/****************************************************************************/
/* */
/* Application: E D T V */
/* */
/* Description: This file contains all the routines for controlling */
/* how a movie is played and displayed in the window. */
/* */
/* File: remote.c */
/* */
/* Files: about.c - routines for the about box */
/* EDTV.c - routines for displaying movies */
/* menu.c - routines for handling the menu */
/* remote.c - routines for controlling the movie */
/* EDTV.h - header file information */
/* */
/* Programmer: Edgar Lee */
/* Organization: Apple Computer, Inc. */
/* Department: Developer Technical Support, DTS */
/* Language: C (Think C version 5.0) */
/* Date Created: 10-26-91 */
/* */
/****************************************************************************/
#include "EDTV.h"
#define MAXBUTTONS 26 /* Total number of buttons/cicn's. */
#define ACTUALREMOTE 0
#define MINIREMOTE 1
struct buttonType
{
CIconHandle icon;
Rect rect;
};
struct {
char s[8];
} gButtonLabel[MAXBUTTONS] =
{
"\pstill",
"\prew", "\pplay B", "\pplay F", "\pff",
"\pstart", "\pstep B", "\pstep F", "\pend",
"\pvol-", "\pvol+","\pmovie", "\p",
"\pmute", "\pPower", "\p", "\p",
"\p", "\p", "\p", "\p",
"\p", "\p", "\p", "\prepeat",
"\p"
};
struct buttonType gButton[MAXBUTTONS];
WindowPtr gRWindow; /* Window used for displaying the remote control. */
PicHandle gReadOutPict; /* Pict of readout display. */
PicHandle gMiniRemote; /* Pict of the scaled down remote image. */
int gCurrentMovie = 0;
int gRemoteSize = ACTUALREMOTE;
int gLoopSetting = CONTINUOUS_PLAY;
/*-------------------------------------------------------------------------------------*/
void createRWindow()
{
Rect rect;
int width, height;
SetRect( &rect, RLEFT, RTOP, RLEFT + RWIDTH, RTOP + RHEIGHT );
gRWindow = NewCWindow( 0L, &rect, "\p", true, rDocProc,
(WindowPtr)-1L, false, 0L );
SetPort( gRWindow );
TextFont( geneva );
TextMode( 0 );
TextSize( 9 );
initButtons();
gReadOutPict = (PicHandle)GetResource( 'PICT', 137 );
gMiniRemote = (PicHandle)GetResource( 'PICT', 136 );
OffsetRect( &(**gMiniRemote).picFrame,
(**gMiniRemote).picFrame.left, (**gMiniRemote).picFrame.top );
width = (**gReadOutPict).picFrame.right - (**gReadOutPict).picFrame.left;
height = (**gReadOutPict).picFrame.bottom - (**gReadOutPict).picFrame.top;
SetRect( &(**gReadOutPict).picFrame, (RWIDTH - width) / 2, 38,
(RWIDTH - width) / 2 + width, 38 + height );
}
/*-------------------------------------------------------------------------------------*/
void initButtons()
{
int i;
int col, row;
for (i = 0; i < MAXBUTTONS; i++)
gButton[i].icon = GetCIcon( 200 + i );
col = 12;
row = 10;
SetRect( &gButton[12].rect, col, row, col + 12, row + 12 );
row += 4;
col = gRWindow->portRect.right - 40;
SetRect( &gButton[14].rect, col, row, col + 32, row + 16 );
col -= 38;
SetRect( &gButton[16].rect, col, row, col + 32, row + 16 );
col -= 38;
SetRect( &gButton[15].rect, col, row, col + 32, row + 16 );
col = 10;
row += 90;
SetRect( &gButton[0].rect, col, row, col + 32, row + 24 );
SetRect( &gButton[24].rect, col + 36, row, col + 68, row + 24 );
col = gRWindow->portRect.right - 50;
SetRect( &gButton[11].rect, col, row + 5, col + 32, row + 5 + 16 );
col = 10;
row += 40;
for (i = 1; i < 9; i++)
{
SetRect( &gButton[i].rect, (((i - 1) % 4) * 36) + col,
row, (((i - 1) % 4) * 36) + col + 32, row + 24 );
if (i % 4 == 0)
row += 40;
}
col = gRWindow->portRect.right - 82;
row -= 17;
for (i = 17; i < 23; i++)
{
if ((i - 17) % 2 == 0)
row += 20;
SetRect( &gButton[i].rect, (((i - 17) % 2) * 37) + col,
row, (((i - 17) % 2) * 37) + col + 32, row + 16 );
}
col = 14;
row -= 42;
SetRect( &gButton[13].rect, col, row, col + 16, row + 16 );
row += 32;
SetRect( &gButton[9].rect, col, row, col + 20, row + 24 );
SetRect( &gButton[10].rect, col + 28, row, col + 20 + 28, row + 24 );
SetRect( &gButton[23].rect, gRWindow->portRect.right - 30,
gRWindow->portRect.bottom - 64,
gRWindow->portRect.right - 15,
gRWindow->portRect.bottom - 32 );
SetRect( &gButton[25].rect, 12, gRWindow->portRect.bottom - 48,
44, gRWindow->portRect.bottom - 14 );
}
/*-------------------------------------------------------------------------------------*/
void drawRemote()
{
if (gRemoteSize == ACTUALREMOTE)
drawActualRemote();
else
drawMiniRemote();
}
/*-------------------------------------------------------------------------------------*/
void drawMiniRemote()
{
DrawPicture( gMiniRemote, &gRWindow->portRect );
}
/*-------------------------------------------------------------------------------------*/
void drawActualRemote()
{
int i;
Rect rect;
SetPort( gRWindow );
useColor( WHITE, BG );
EraseRect( &gRWindow->portRect );
rect = gRWindow->portRect;
InsetRect( &rect, 1, 1 );
rect.top -= 10;
useColor( SLATE, FG );
PaintRoundRect( &rect, 16, 16 );
InsetRect( &rect, 5, 5 );
rect.top = 217;
useColor( BLACK, FG );
PaintRoundRect( &rect, 16, 16 );
for (i = 0; i < MAXBUTTONS; i++ )
{
PlotCIcon( &gButton[i].rect, gButton[i].icon );
useColor( MUSTARD, FG );
if (i == 9 || i == 10 || i == 13)
useColor( BLACK, BG );
else
useColor( SLATE, BG );
if (i == 13)
{
useColor( RED, FG );
MoveTo( gButton[i].rect.right + 5, gButton[i].rect.top + 7 );
}
else
MoveTo( gButton[i].rect.left +
((gButton[i].rect.right - gButton[i].rect.left -
StringWidth( gButtonLabel[i].s )) / 2),
gButton[i].rect.top - 3 );
DrawString( gButtonLabel[i].s );
if (i == 11)
{
MoveTo( gButton[i].rect.left - 8 , gButton[i].rect.top + 11 );
DrawChar( '1' );
MoveTo( gButton[i].rect.right + 4 , gButton[i].rect.top + 11 );
DrawChar( '2' );
}
}
DrawPicture( gReadOutPict, &(**gReadOutPict).picFrame );
useColor( BLACK, BG );
MoveTo( 14, 297 );
DrawString( "\pLevel:" );
MoveTo( gButton[25].rect.right + 8, gButton[25].rect.bottom - 2 );
DrawString( "\pS y s t e m Remote" );
drawReadOutText();
drawCurrentTime();
drawVolume();
drawPoster();
useColor( BLACK, FG );
useColor( WHITE, BG );
}
/*-------------------------------------------------------------------------------------*/
void drawVolume()
{
Rect rect;
short volume;
CIconHandle icon;
SetPort( gRWindow );
SetRect( &rect, 48, 288, 58, 303 );
if (gMoviesStatus == MOVIE_LOADED || gMoviesStatus == MOVIE_HIDDEN)
{
volume = GetMovieVolume( (gCurrentMovie ? gMovie2 : gMovie1) );
if (volume >= 0)
{
if (volume > 255)
volume = 255;
volume = ((float)volume / 28.3333) + 0.5;
}
else
volume = -1;
}
else
volume = 0;
icon = GetCIcon( 130 + volume );
PlotCIcon( &rect, icon );
DisposHandle( icon );
}
/*-------------------------------------------------------------------------------------*/
void drawPoster()
{
Rect rect;
PicHandle poster;
RgnHandle rgn;
extern RgnHandle gOrigMovieClipRgn;
SetPort( gRWindow );
SetRect( &rect, 68, 292, 120, 328 );
if (gMoviesStatus == NO_MOVIE)
{
useColor( BLACK, FG );
PaintRect( &rect );
}
else
{
rgn = GetMovieClipRgn( gMovie1 );
SetMovieClipRgn( gMovie1, gOrigMovieClipRgn );
poster = GetMoviePosterPict( gMovie1 );
if (poster != nil)
{
useColor( GREY, FG );
FrameRect( &rect );
InsetRect( &rect, 3, 3 );
DrawPicture( poster, &rect );
KillPicture( poster );
}
SetMovieClipRgn( gMovie1, rgn );
DisposeRgn( rgn );
}
}
/*-------------------------------------------------------------------------------------*/
void drawReadOutText()
{
int col, row;
SetPort( gRWindow );
useColor( RED, FG );
useColor( BLACK, BG );
col = (**gReadOutPict).picFrame.left + 32;
row = (**gReadOutPict).picFrame.top + 17;
MoveTo( col, row );
DrawString( "\pTime" );
MoveTo( RWIDTH - 66, row );
DrawString( "\pRemaining" );
}
/*-------------------------------------------------------------------------------------*/
void drawCurrentTime()
{
int col, row;
int h, m, s;
char string[12];
TimeRecord tr;
TimeValue movie1Secs, movie2Secs;
if (gMoviesStatus == NO_MOVIE || gRemoteSize == MINIREMOTE)
return;
SetPort( gRWindow );
useColor( WHITE, FG );
useColor( BLACK, BG );
col = (**gReadOutPict).picFrame.left + 32;
row = (**gReadOutPict).picFrame.top + 29;
movie1Secs = GetMovieTime( gMovie1, &tr );
movie1Secs /= tr.scale;
sec2hms( movie1Secs, &h, &m, &s );
sprintf( string, "%02d:%02d:%02d", h, m, s );
MoveTo( col, row );
DrawString( CtoPstr( string ) );
sec2hms( (gMovieDuration / tr.scale) - movie1Secs, &h, &m, &s );
sprintf( string, "%02d:%02d:%02d", h, m, s );
MoveTo( (**gReadOutPict).picFrame.right - 58, row );
DrawString( CtoPstr( string ) );
row += 12;
movie2Secs = GetMovieTime( gMovie2, &tr );
movie2Secs /= tr.scale;
sec2hms( movie2Secs, &h, &m, &s );
sprintf( string, "%02d:%02d:%02d", h, m, s );
MoveTo( col, row );
DrawString( CtoPstr( string ) );
sec2hms( (gMovieDuration / tr.scale) - movie2Secs, &h, &m, &s );
sprintf( string, "%02d:%02d:%02d", h, m, s );
MoveTo( (**gReadOutPict).picFrame.right - 58, row );
DrawString( CtoPstr( string ) );
}
/*-------------------------------------------------------------------------------------*/
void redrawRemoteOnClose()
{
SetPort( gRWindow );
DrawPicture( gReadOutPict, &(**gReadOutPict).picFrame );
drawReadOutText();
drawVolume();
drawPoster();
}
/*-------------------------------------------------------------------------------------*/
void sec2hms( secs, h, m, s )
long secs;
int *h, *m, *s;
{
*h = secs / 3600;
*m = (secs % 3600) / 60;
*s = (secs % 3600) % 60;
}
/*-------------------------------------------------------------------------------------*/
void identifyMovies()
{
Rect rect;
int size;
extern WindowPtr gWindow;
if (gMoviesStatus == MOVIE_LOADED)
{
SetPort( gRWindow );
SetPort( gWindow );
useColor( WHITE, FG );
useColor( BLACK, BG );
TextMode( srcOr );
GetMovieBox( gMovie1, &rect );
size = (rect.bottom - rect.top) / 2;
TextSize( size );
MoveTo( (rect.right - rect.left - CharWidth( '1' )) / 2 + rect.left,
(rect.bottom - rect.top + size) / 2 + rect.top );
DrawChar( '1' );
if (GetMovieActive( gMovie2 ))
{
GetMovieBox( gMovie2, &rect );
size = (rect.bottom - rect.top) / 2;
TextSize( size );
MoveTo( (rect.right - rect.left - CharWidth( '2' )) / 2 + rect.left,
(rect.bottom - rect.top + size) / 2 + rect.top );
DrawChar( '2' );
}
while( Button() );
TextSize( 9 );
TextMode( 0 );
UpdateMovie( gMovie1 );
if (GetMovieActive( gMovie2 ))
UpdateMovie( gMovie2 );
SetPort( gRWindow );
}
}
/*-------------------------------------------------------------------------------------*/
void doPlay( rate )
long rate;
{
if (gMoviesStatus == MOVIE_LOADED)
{
if (rate == 0)
{
if (gCurrentMovie == 0 || (gCurrentMovie == 1 && GetMovieActive( gMovie2 )))
StopMovie( (gCurrentMovie ? gMovie2 : gMovie1) );
}
else
{
if (gCurrentMovie == 0 || (gCurrentMovie == 1 && GetMovieActive( gMovie2 )))
SetMovieRate( (gCurrentMovie ? gMovie2 : gMovie1), Long2Fix( rate ) );
}
}
while( Button() )
{
MoviesTask( gMovie1, (long)0 );
MoviesTask( gMovie2, (long)0 );
}
}
/*-------------------------------------------------------------------------------------*/
void doGoto( where )
int where;
{
if (gMoviesStatus == MOVIE_LOADED);
{
if (gCurrentMovie == 0 || (gCurrentMovie == 1 && GetMovieActive( gMovie2 )))
{
StopMovie( (gCurrentMovie ? gMovie2 : gMovie1) );
if (where < 0)
GoToBeginningOfMovie( (gCurrentMovie ? gMovie2 : gMovie1) );
else
GoToEndOfMovie( (gCurrentMovie ? gMovie2 : gMovie1) );
}
}
while( Button() )
{
MoviesTask( gMovie1, (long)0 );
MoviesTask( gMovie2, (long)0 );
}
}
/*-------------------------------------------------------------------------------------*/
void doStep( frames )
short frames;
{
TimeRecord tr;
do
{
liteLight();
if (gMoviesStatus == MOVIE_LOADED)
{
if (gCurrentMovie == 0 || (gCurrentMovie == 1 && GetMovieActive( gMovie2 )))
{
StopMovie( (gCurrentMovie ? gMovie2 : gMovie1) );
GetMovieTime( (gCurrentMovie ? gMovie2 : gMovie1), &tr );
if (frames > 0)
{
tr.value.lo += tr.scale;
if (tr.value.lo > gMovieDuration)
{
if (gLoopSetting == CONTINUOUS_PLAY)
tr.value.lo = 0;
else
tr.value.lo = gMovieDuration;
}
}
else
{
tr.value.lo -= tr.scale;
if (tr.value.lo < 0)
{
if (gLoopSetting == CONTINUOUS_PLAY)
tr.value.lo = gMovieDuration;
else
tr.value.lo = 0;
}
}
SetMovieTime( (gCurrentMovie ? gMovie2 : gMovie1), &tr );
MoviesTask( gMovie1, (long)0 );
MoviesTask( gMovie2, (long)0 );
drawCurrentTime();
}
}
dimLight();
} while( Button() );
}
/*-------------------------------------------------------------------------------------*/
void doVolume( level )
int level;
{
short volume;
SetPort( gRWindow );
do
{
liteLight();
if (gMoviesStatus == MOVIE_LOADED || gMoviesStatus == MOVIE_HIDDEN)
{
volume = GetMovieVolume( (gCurrentMovie ? gMovie2 : gMovie1) );
if (volume >= 0)
{
if (volume > 255)
volume = 255;
if (level > 0)
{
volume += 10;
if (volume > 255)
volume = 255;
}
else
{
volume -= 10;
if (volume < 0)
volume = 0;
}
SetMovieVolume( (gCurrentMovie ? gMovie2 : gMovie1), volume );
drawVolume();
}
MoviesTask( gMovie1, (long)0 );
MoviesTask( gMovie2, (long)0 );
}
dimLight();
} while( Button() );
}
/*-------------------------------------------------------------------------------------*/
void toggleMovies( point )
Point point;
{
int i;
gCurrentMovie = 1 - gCurrentMovie;
if (gCurrentMovie == 0)
i = 211;
else
i = 311;
gButton[11].icon = GetCIcon( i );
useColor( SLATE, FG );
PaintRect( &gButton[11].rect );
PlotCIcon( &gButton[11].rect, gButton[11].icon );
drawVolume();
while( Button() );
}
/*-------------------------------------------------------------------------------------*/
void doMute()
{
int volume;
volume = GetMovieVolume( (gCurrentMovie ? gMovie2 : gMovie1) );
SetMovieVolume( (gCurrentMovie ? gMovie2 : gMovie1), -volume );
drawVolume();
while( Button() )
{
MoviesTask( gMovie1, (long)0 );
MoviesTask( gMovie2, (long)0 );
}
}
/*-------------------------------------------------------------------------------------*/
void doEject()
{
if (gMoviesStatus == MOVIE_LOADED)
{
dimLight();
closeMovie();
SetPort( gRWindow );
}
while( Button() );
}
/*-------------------------------------------------------------------------------------*/
void doLoad()
{
if (gMoviesStatus == NO_MOVIE)
{
selectMovie();
SetPort( gRWindow );
}
while( Button() );
}
/*-------------------------------------------------------------------------------------*/
void doNormal()
{
Point pt;
if (gMoviesStatus == MOVIE_LOADED)
{
if (gCurrentMovie == 1)
{
pt.h = gButton[10].rect.left;
pt.v = gButton[10].rect.top;
toggleMovies( pt );
}
setGridClipRgn( 1 );
}
while( Button() )
{
MoviesTask( gMovie1, (long)0 );
MoviesTask( gMovie2, (long)0 );
}
}
/*-------------------------------------------------------------------------------------*/
void doPiP()
{
static int pos = LRSPOT;
do
{
if (gMoviesStatus == MOVIE_LOADED)
{
setPiPClipRgn( pos );
pos = (pos + 1) % 5;
MoviesTask( gMovie1, (long)0 );
MoviesTask( gMovie2, (long)0 );
}
} while( Button() );
}
/*-------------------------------------------------------------------------------------*/
void doMatrix()
{
static int div = 2;
do
{
if (gMoviesStatus == MOVIE_LOADED)
{
setGridClipRgn( div );
if ((div += 1) == 7)
div = 2;
MoviesTask( gMovie1, (long)0 );
MoviesTask( gMovie2, (long)0 );
}
} while( Button() );
}
/*-------------------------------------------------------------------------------------*/
void doSplit()
{
static int pos = LSPLIT;
do
{
if (gMoviesStatus == MOVIE_LOADED)
{
setSplitClipRgn( pos );
pos = (pos + 1) % 4;
MoviesTask( gMovie1, (long)0 );
MoviesTask( gMovie2, (long)0 );
}
} while( Button() );
}
/*-------------------------------------------------------------------------------------*/
void doMult()
{
if (gMoviesStatus == MOVIE_LOADED || gMoviesStatus == MOVIE_HIDDEN)
{
setStillFrames();
gMoviesStatus = MOVIE_HIDDEN;
}
while( Button() );
}
/*-------------------------------------------------------------------------------------*/
void doSwap()
{
Movie tmpMovie;
TimeValue tmpTimeValue;
Boolean tmpActiveState;
Fixed tmpRate;
int tmpVolume;
extern WindowPtr gWindow;
if (gMoviesStatus == MOVIE_LOADED && GetMovieActive( gMovie2 ))
{
SetPort( gWindow );
tmpMovie = gMovie1;
gMovie1 = gMovie2;
gMovie2 = tmpMovie;
tmpTimeValue = GetMovieTime( gMovie1, nil );
SetMovieTimeValue( gMovie1, GetMovieTime( gMovie2, nil ) );
SetMovieTimeValue( gMovie2, tmpTimeValue );
tmpActiveState = GetMovieActive( gMovie1 );
SetMovieActive( gMovie1, GetMovieActive( gMovie2 ) );
SetMovieActive( gMovie2, tmpActiveState );
tmpRate = GetMovieRate( gMovie1 );
SetMovieRate( gMovie1, GetMovieRate( gMovie2 ) );
SetMovieRate( gMovie2, tmpRate );
tmpVolume = GetMovieVolume( gMovie1 );
SetMovieVolume( gMovie1, GetMovieVolume( gMovie2 ) );
SetMovieVolume( gMovie2, tmpVolume );
MoviesTask( gMovie1, (long)0 );
MoviesTask( gMovie2, (long)0 );
}
}
/*-------------------------------------------------------------------------------------*/
void toggleLoop()
{
while( Button() )
{
if (gMoviesStatus == MOVIE_LOADED)
{
MoviesTask( gMovie1, (long)0 );
MoviesTask( gMovie2, (long)0 );
}
}
gLoopSetting = CONTINUOUS_PLAY - gLoopSetting;
if (gLoopSetting == CONTINUOUS_PLAY)
gButton[24].icon = GetCIcon( 224 );
else
gButton[24].icon = GetCIcon( 324 );
PlotCIcon( &gButton[23].rect, gButton[23].icon );
}
/*-------------------------------------------------------------------------------------*/
void liteLight()
{
gButton[12].icon = GetCIcon( 312 );
PlotCIcon( &gButton[12].rect, gButton[12].icon );
}
/*-------------------------------------------------------------------------------------*/
void dimLight()
{
gButton[12].icon = GetCIcon( 212 );
PlotCIcon( &gButton[12].rect, gButton[12].icon );
}
/*-------------------------------------------------------------------------------------*/
void invertIcon( i )
int i;
{
Rect rect;
CIconHandle icon;
SetPort( gRWindow );
icon = gButton[i].icon;
HLock( (**icon).iconData );
HLock( icon );
(**icon).iconPMap.baseAddr = *(**icon).iconData;
(**icon).iconMask.baseAddr = (Ptr)&(**icon).iconMaskData;
CopyBits( &(**icon).iconPMap, &gRWindow->portBits,
&(**icon).iconPMap.bounds, &gButton[i].rect, notSrcCopy, 0 );
HUnlock( (**icon).iconData );
HUnlock( icon );
}
/*-------------------------------------------------------------------------------------*/
void resizeRemote()
{
SetPort( gRWindow );
if (gRemoteSize == ACTUALREMOTE)
SizeWindow( gRWindow, RWIDTH, RHEIGHT, true );
else
SizeWindow( gRWindow, (**gMiniRemote).picFrame.right,
(**gMiniRemote).picFrame.bottom, true );
InvalRect( &gRWindow->portRect );
}
/*-------------------------------------------------------------------------------------*/
void doRemoteEvent( point )
Point point;
{
int i;
Rect rect;
if (gRemoteSize == MINIREMOTE)
{
gRemoteSize = ACTUALREMOTE;
resizeRemote();
return;
}
SetRect( &rect, 68, 292, 120, 328 );
if (PtInRect( point, &rect ))
{
identifyMovies();
return;
}
for (i = 0; i < MAXBUTTONS; i++)
{
if (i == 12)
continue;
if (PtInRect( point, &gButton[i].rect ))
{
SetPort( gRWindow );
useColor( BLACK, FG );
useColor( WHITE, BG );
if (gMoviesStatus == MOVIE_HIDDEN
&& (i < 9 || i > 13) && i != 21 && i != 23 && i != 25)
{
SetMovieActive( gMovie1, true );
SetMovieActive( gMovie2, false );
gMoviesStatus = MOVIE_LOADED;
}
liteLight();
if (i != 11)
invertIcon( i );
if (i == 0)
doPlay( 0 );
else if (i == 1)
doPlay( -2 );
else if (i == 2)
doPlay( -1 );
else if (i == 3)
doPlay( 1 );
else if (i == 4)
doPlay( 2 );
else if (i == 5)
doGoto( -1 );
else if (i == 6)
doStep( -1 );
else if (i == 7)
doStep( 1 );
else if (i == 8)
doGoto( 1 );
else if (i == 9)
doVolume( -1 );
else if (i == 10)
doVolume( 1 );
else if (i == 11)
toggleMovies( point );
else if (i == 13)
doMute();
else if (i == 14)
quit();
else if (i == 15)
doEject();
else if (i == 16)
doLoad();
else if (i == 17)
doNormal();
else if (i == 18)
doPiP();
else if (i == 19)
doMatrix();
else if (i == 20)
doSplit();
else if (i == 21)
doMult();
else if (i == 22)
doSwap();
else if (i == 24)
toggleLoop();
SetPort( gRWindow );
if (i != 11)
PlotCIcon( &gButton[i].rect, gButton[i].icon );
dimLight();
if (i == 23)
{
gRemoteSize = MINIREMOTE;
resizeRemote();
}
else if (i == 25)
doAboutBox();
break;
}
}
}